'\" t
.\"     Title: 
    adintool
  
.\"    Author: 
.\" Generator: DocBook XSL Stylesheets v1.76.1 <http://docbook.sf.net/>
.\"      Date: 12/19/2013
.\"    Manual: 
.\"    Source: 
.\"  Language: English
.\"
.TH "ADINTOOL" "1" "12/19/2013" ""
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.\" http://bugs.debian.org/507673
.\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" -----------------------------------------------------------------
.\" * set default formatting
.\" -----------------------------------------------------------------
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.\" -----------------------------------------------------------------
.\" * MAIN CONTENT STARTS HERE *
.\" -----------------------------------------------------------------
.SH "NAME"

    adintool
   \- a tool to record / split / send / receive audio streams
.SH "SYNOPSIS"
.HP \w'\fBadintool\fR\ 'u
\fBadintool\fR {\-in\ \fIinputdev\fR} {\-out\ \fIoutputdev\fR} [\fIoptions\fR...]
.SH "DESCRIPTION"
.PP

\fBadintool\fR
analyzes speech input, finds speech segments skipping silence, and records the detected segments in various ways\&. It performs speech detection based on zerocross number and power (level), and records the detected parts to files or other output devices sucessively\&.
.PP

\fBadintool\fR
is a upper version of adinrec with various functions\&. Supported input device are: microphone input, a speech file, standard tty input, and network socket (called adin\-net server mode)\&. Julius plugin can be also used\&. Detected speech segments will be saved to output devices: speech files, standard tty output, and network socket (called adin\-net client mode)\&. For example, you can split the incoming speech to segments and send them to Julius to be recognized\&.
.PP
Output format is WAV, 16bit (signed short), monoral\&. If the file already exist, it will be overridden\&.
.SH "OPTIONS"
.PP
All Julius options can be set\&. Only audio input related options are treated and others are silently skipped\&. Below is a list of options\&.
.SS "adintool specific options"
.PP
\fB \-freq \fR \fIHz\fR
.RS 4
Set sampling rate in Hz\&. (default: 16,000)
.RE
.PP
\fB \-in \fR \fIinputdev\fR
.RS 4
Audio input device\&. "mic" to capture via microphone input, "file" for audio file input, and "stdin" to read raw data from standard\-input\&. For file input, file name prompt will appear after startup\&. Use "adinnet" to make
\fBadintool\fR
as "adinnet server", receiving data from client via network socket\&. Default port number is 5530, which can be altered by option "\fB\-inport\fR"\&.
.sp
Alternatively, input device can be set by "\fB\-input\fR" option, in which case you can use plugin input\&.
.RE
.PP
\fB \-out \fR \fIoutputdev\fR
.RS 4
Audio output device store the data\&. Specify "file" to save to file, in which the output filename should be given by "\fB\-filename\fR"\&. Use "stdout" to standard out\&. "adinnet" will make
\fBadintool\fR
to be an adinnet client, sending speech data to a server via tcp/ip socket\&. "vecnet" will make
\fBadintool\fR
to be a vecnet client, sending feature vectors extracted from input to a server via tcp/ip socket\&. When using "adinnet" and "vecnet" output, the server name to send data should be specified by "\fB\-server\fR"\&. The default port number is 5530, which can be changed by "\fB\-port\fR" option\&.
.RE
.PP
\fB \-inport \fR \fInum\fR
.RS 4
When adintool becomes adinnet server to receive data (\-in adinnet), set the port number to listen\&. (default: 5530)
.RE
.PP
\fB \-server \fR [host] [,host...]
.RS 4
When output to adinnet server (\-out adinnet), set the hostname\&. You can send to multiple hosts by specifying their hostnames as comma\-delimited list like "host1,host2,host3"\&.
.RE
.PP
\fB \-port \fR [num] [,num...]
.RS 4
When adintool send a data to adinnet server (\-out adinnet), set the port number to connect\&. (default: 5530) For multiple servers, specify port numbers for all servers like "5530,5530,5531"\&.
.RE
.PP
\fB \-filename \fR \fIfile\fR
.RS 4
When output to file (\fB\-out file\fR), set the output filename\&. The actual file name will be as "file\&.0000\&.wav" , "file\&.0001\&.wav" and so on, where the four digit number increases as speech segment detected\&. The initial number will be set to 0 by default, which can be changed by "\fB\-startid\fR" option\&. When using "\fB\-oneshot\fR" option to save only the first segment, the input will be saved as "file"\&.
.RE
.PP
\fB \-startid \fR \fInumber\fR
.RS 4
At file output, set the initial file number\&. (default: 0)
.RE
.PP
\fB \-oneshot \fR
.RS 4
Exit after the end of first speech segment\&.
.RE
.PP
\fB \-nosegment \fR
.RS 4
Do not perform speech detection for input, just treat all the input as a single valid segment\&.
.RE
.PP
\fB \-raw \fR
.RS 4
Output as RAW file (no header)\&.
.RE
.PP
\fB \-autopause \fR
.RS 4
When output to adinnet server,
\fBadintool\fR
enter pause state at every end of speech segment\&. It will restart when the destination adinnet server sends it a resume signal\&.
.RE
.PP
\fB \-loosesync \fR
.RS 4
When output to multiple adinnet server, not to do strict synchronization for restart\&. By default, when
\fBadintool\fR
has entered pause state, it will not restart until resume commands are received from all servers\&. This option will allow restart at least one restart command has arrived\&.
.RE
.PP
\fB \-rewind \fR \fImsec\fR
.RS 4
When input is a live microphone device, and there has been some continuing input at the moment
\fBadintool\fR
resumes, it start recording backtracking by the specified milliseconds\&.
.RE
.PP
\fB \-paramtype \fR \fIparameter_type\fR
.RS 4
When output is a vecnet (\fB\-out vecnet\fR), specify parameter type in HTK format like "MFCC_E_D_N_Z"\&.
.RE
.PP
\fB \-veclen \fR \fIvector_length\fR
.RS 4
When output is a vecnet (\fB\-out vecnet\fR), specify vector length (dim\&.)\&.
.RE
.SS "Concerning Julius options"
.PP
\fB \-input \fR {mic|rawfile|adinnet|stdin|netaudio|esd|alsa|oss}
.RS 4
Choose speech input source\&. Specify \*(Aqfile\*(Aq or \*(Aqrawfile\*(Aq for waveform file\&. On file input, users will be prompted to enter the file name from stdin\&.
.sp
\*(Aqmic\*(Aq is to get audio input from a default live microphone device, and \*(Aqadinnet\*(Aq means receiving waveform data via tcpip network from an adinnet client\&. \*(Aqnetaudio\*(Aq is from DatLink/NetAudio input, and \*(Aqstdin\*(Aq means data input from standard input\&.
.sp
At Linux, you can choose API at run time by specifying
alsa,
oss
and
esd\&.
.RE
.PP
\fB \-lv \fR \fIthres\fR
.RS 4
Level threshold for speech input detection\&. Values should be in range from 0 to 32767\&. (default: 2000)
.RE
.PP
\fB \-zc \fR \fIthres\fR
.RS 4
Zero crossing threshold per second\&. Only input that goes over the level threshold (\fB\-lv\fR) will be counted\&. (default: 60)
.RE
.PP
\fB \-headmargin \fR \fImsec\fR
.RS 4
Silence margin at the start of speech segment in milliseconds\&. (default: 300)
.RE
.PP
\fB \-tailmargin \fR \fImsec\fR
.RS 4
Silence margin at the end of speech segment in milliseconds\&. (default: 400)
.RE
.PP
\fB \-zmean \fR
.RS 4
This option enables DC offset removal\&.
.RE
.PP
\fB \-smpFreq \fR \fIHz\fR
.RS 4
Set sampling rate in Hz\&. (default: 16,000)
.RE
.PP
\fB \-48 \fR
.RS 4
Record input with 48kHz sampling, and down\-sample it to 16kHz on\-the\-fly\&. This option is valid for 16kHz model only\&. The down\-sampling routine was ported from
sptk\&. (Rev\&. 4\&.0)
.RE
.PP
\fB \-NA \fR \fIdevicename\fR
.RS 4
Host name for DatLink server input (\fB\-input netaudio\fR)\&.
.RE
.PP
\fB \-adport \fR \fIport_number\fR
.RS 4
With
\fB\-input adinnet\fR, specify adinnet port number to listen\&. (default: 5530)
.RE
.PP
\fB \-nostrip \fR
.RS 4
Julius by default removes successive zero samples in input speech data\&. This option stop it\&.
.RE
.PP
\fB \-C \fR \fIjconffile\fR
.RS 4
Load a jconf file at here\&. The content of the jconffile will be expanded at this point\&.
.RE
.PP
\fB \-plugindir \fR \fIdirlist\fR
.RS 4
Specify which directories to load plugin\&. If several direcotries exist, specify them by colon\-separated list\&.
.RE
.SH "ENVIRONMENT VARIABLES"
.PP
\fB \fR\fB\fBALSADEV\fR\fR\fB \fR
.RS 4
(using mic input with alsa device) specify a capture device name\&. If not specified, "default" will be used\&.
.RE
.PP
\fB \fR\fB\fBAUDIODEV\fR\fR\fB \fR
.RS 4
(using mic input with oss device) specify a capture device path\&. If not specified, "/dev/dsp" will be used\&.
.RE
.PP
\fB \fR\fB\fBPORTAUDIO_DEV\fR\fR\fB \fR
.RS 4
(portaudio V19) specify the name of capture device to use\&. See the instruction output of log at start up how to specify it\&.
.RE
.PP
\fB \fR\fB\fBLATENCY_MSEC\fR\fR\fB \fR
.RS 4
Try to set input latency of microphone input in milliseconds\&. Smaller value will shorten latency but sometimes make process unstable\&. Default value will depend on the running OS\&.
.RE
.SH "EXAMPLES"
.PP
Record microphone input to files: "data\&.0000\&.wav", "data\&.0001\&.wav" and so on:
.sp .if n \{\ .RS 4 .\} .nf % \fBadintool\fR \-in mic \-out file \-filename data .fi .if n \{\ .RE .\}
Split a long speech file "foobar\&.raw" into "foobar\&.1500\&.wav", "foobar\&.1501\&.wav" \&.\&.\&.:
.sp .if n \{\ .RS 4 .\} .nf % \fBadintool\fR \-in file \-out file \-filename foobar \-startid 1500 % enter filename\->foobar\&.raw .fi .if n \{\ .RE .\}
Copy an entire audio file via network socket\&.
.sp .if n \{\ .RS 4 .\} .nf (sender) % \fBadintool\fR \-in file \-out adinnet \-server \fIreceiver_hostname\fR \-nosegment (receiver) % \fBadintool\fR \-in adinnet \-out file \-nosegment .fi .if n \{\ .RE .\}
Detect speech segment, send to Julius via network and recognize it:
.sp .if n \{\ .RS 4 .\} .nf (sender) % \fBadintool\fR \-in mic \-out adinnet \-server \fIreceiver_hostname\fR (receiver) % \fBjulius\fR \-C \&.\&.\&. \-input adinnet .fi .if n \{\ .RE .\}
.SH "SEE ALSO"
.PP

\fB julius \fR( 1 )
,
\fB adinrec \fR( 1 )
.SH "COPYRIGHT"
.PP
Copyright (c) 1991\-2013 Kawahara Lab\&., Kyoto University
.PP
Copyright (c) 1997\-2000 Information\-technology Promotion Agency, Japan
.PP
Copyright (c) 2000\-2005 Shikano Lab\&., Nara Institute of Science and Technology
.PP
Copyright (c) 2005\-2013 Julius project team, Nagoya Institute of Technology
.SH "LICENSE"
.PP
The same as Julius\&.
